#ifndef FUNCTION_H
#define FUNCTION_H

#include <iostream>
#include <cmath>

class Function
{
    public:
        virtual double get_value(double x)=0;
        virtual double get_derivation(double x){
            double eps = 1e-5;
            return ((this->get_value(x+eps))-(this->get_value(x-eps)))/(2*eps);
        }
};

#endif // FUNCTION_H